<!DOCTYPE html>
<html lang="en">
<header>
    <meta charset = "utf-8"/>
    <title>文件上传案例</title>
</header>
<body>
    <h1>SpringBoot file upload Example!</h1>
    <!--
          1、上传文件设置enctype为multipart/form-data,
          2、一次选择多个文件加属性multiple="multiple"(name和value一致时，value可省略),后端使用MultipartFile[]数组接收
    -->
    <form method="post" action="/upload" enctype="multipart/form-data">
        <input type="file" name="files" id="files" multiple><br/><br/>
        <input type="submit" value="Submit">
    </form>

    <h1>SpringBoot Boot - Multiple file upload example - AJAX</h1>
    <form method="post" enctype="multipart/form-data" id="fileUploadForm">
        <input type="text" name="extraField"/><br/><br/>
        <input type="file" name="files"/><br/><br/>
        <input type="file" name="files"/><br/><br/>
        <input type="submit" value="Submit" id="btnSubmit"/>
    </form>

    <h1>Ajax Post Result</h1>
    <pre>
        <span id="result"></span>
    </pre>
    <br/><br/>
    <hr/>
    <div class="container" style="min-height: 500px">
        <div class="starter-template">
            <h1>Spring Boot AJAX Example</h1>
        </div>

        <div id="feedback"></div>

        <form class="form-horizontal" id="search-form">
            <div class="form-group form-group-lg">
                <label class="col-sm-2 control-label" for="username">Username</label>
                <div class="col-sm-10">
                    <input type="text" class="form-control" id="username"/>
                </div>
            </div>

            <div class="form-group">
                <div class="col-sm-offset-2 col-sm-10">
                    <button type="submit" id="btn-search" class="btn btn-primary btn-lg">Search</button>
                </div>
            </div>
        </form>
    </div>

    <script type="text/javascript" src="webjars/jquery/3.5.1/jquery.min.js"></script>
    <script type="text/javascript" src="js/main.js"></script>
</body>
</html>